﻿@model List<Core.Contract.DataContract.RelaxAdvertiseDataContract>

@if (Model != null)
{
    var first = Model.FirstOrDefault(p => p.Type == 1);
    if (first != null)
    {
    <img src="~/@first.Image" alt="@first.Name" />
    }
    else
    {
       
    <div id='div-gpt-ad-1421906395209-0' style='width: 728px; height: 90px; margin: 0;'>
        <script type='text/javascript'>
            if (screen.width >= 768) {
                document.write('googletag.cmd.push(function() { googletag.display("div-gpt-ad-1421906395209-0"); });');
            }

            $('#div-gpt-ad-1421907098675-0').remove().hide();
        </script>
    </div>
    <div id='div-gpt-ad-1421907098675-0' style='width: 300px; height: 100px;margin: 0;'>
        <script type='text/javascript'>
            if (screen.width <= 640) {
                document.write('googletag.cmd.push(function() { googletag.display("div-gpt-ad-1421907098675-0"); });');
            }

            $('#div-gpt-ad-1421906395209-0').remove().hide();
        </script>
    </div>
    }
}
else
{
      <div id='div-gpt-ad-1421906395209-0' style='width: 728px; height: 90px; margin: 0;'>
        <script type='text/javascript'>
            if (screen.width >= 768) {
                googletag.cmd.push(function () { googletag.display('div-gpt-ad-1421906395209-0'); });

                $('#div-gpt-ad-1421907098675-0').remove().hide();
            }
        </script>
    </div>
    <div id='div-gpt-ad-1421907098675-0' style='width: 300px; height: 100px;margin: 0;'>
        <script type='text/javascript'>
            if (screen.width <= 767) {
                googletag.cmd.push(function () { googletag.display('div-gpt-ad-1421907098675-0'); });
               
                $('#div-gpt-ad-1421906395209-0').remove().hide();
            }
        </script>
    </div>
    
}
